<!--
  @author duanzuocai
  @功能说明：多边型地图
    需要父页面提供
        1、接收数据方法：submitMap(mapData)
        2、初始化参数-经纬度：mapArgs.point.longitude,latitude
        3、初始化参数-多边型数据，用于回显（百度生成的）：mapArgs.pointData
  @since 2018/11/01 13:18
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" style="height: 100%">
<head th:include="common/common :: jscss">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
    <title>设置线、面可编辑</title>
</head>
<body style="position: relative; overflow: hidden;height: 100%">
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=otGlzpt0684vtqNg4XNF6qvj"></script>
<form method="post" action="" class="layui-form" lay-filter="zmn-company-map-form" style="height: 100%">
    <div class="layui-form-item">
        <label class="layui-form-label">范围类型<span style="color:red;">*</span></label>
        <div class="layui-input-block">
            <input type="radio" id="circularId" name="mapDataType" value="2" lay-filter="scope" th:checked="${baseCompanyArea.mapDataType == 2}" title="圆形范围">
            <input type="radio" name="mapDataType" value="1" lay-filter="scope" th:checked="${baseCompanyArea.mapDataType == 1}" title="手绘范围">
            <input type="radio" name="mapDataType" value="3" lay-filter="scope" th:checked="${baseCompanyArea.mapDataType == 3}" title="全部">
        </div>
    </div>
    <div id="allmap" style="height: 90%"></div>
    <div th:if="${#authPermit.checkPermit('/company/area/drawMap/button.action')}" id="control" style="width: 100%;position: absolute;bottom: 2em;padding-left: 2em;">
        <input class="layui-btn layui-btn-xs" value="开启面编辑功能" id="enableEditing"/>
        <input class="layui-btn layui-btn-xs" value="关闭面编辑功能" id="disableEditing"/>
        <input class="layui-btn layui-btn-xs" value="重置" id="resetMap"/>
        <input class="layui-btn layui-btn-xs" value="完成" id="submitData"/>
    </div>
</form>
<script type="text/javascript" th:inline="javascript">
    layui.config({
        version:"20190718",
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        company_map_edit: "{/}/static/js/module/companyarea/zmn.plat.comany.map.edit",
    }).use(['index', 'company_map_edit']);
    let obj = {
        baseCompanyArea: [[${baseCompanyArea}]]
    }
</script>
</body>